package com.ruoyi.system.domain;

import com.ruoyi.common.annotation.Excel;

public class LoginResponse {

    /** 用户ID */
    private String userType;
    /** 用户账号 */
    private String userName;
    /** 手机号码 */
    private String phonenumber;
    /** 企业名称 */
    private String companyName;
    /** 用户昵称 */
    private String name;



    /** 头像地址 */
    private String avatar;
    /** 统一社会信用代码 */
    private String regNum;



    public String getTokenValue() {
        return tokenValue;
    }

    public void setTokenValue(String tokenValue) {
        this.tokenValue = tokenValue;
    }

    private String tokenValue;

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPhonenumber() {
        return phonenumber;
    }

    public void setPhonenumber(String phonenumber) {
        this.phonenumber = phonenumber;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getRegNum() {
        return regNum;
    }

    public void setRegNum(String regNum) {
        this.regNum = regNum;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public LoginResponse(ShopUser user, String token) {
        if(user!=null){
            this.userType = user.getUserType();
            this.userName = user.getUserName();
            this.phonenumber = user.getPhonenumber();
            this.avatar = user.getAvatar();
            this.regNum = user.getRegNum();
            this.companyName = user.getCompanyName();
            this.name = user.getName();
        }
        this.tokenValue = token;
    }

}
